﻿using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MySql.Data.MySqlClient;

namespace Ama.BugTracker.Web
{
    internal static class AppUtils
    {
        /// <summary>
        /// 返回数据库连接字符串 
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        internal static MySqlConnection CreateDbConnection(string key)
        {
            string connString = ConfigurationManager.ConnectionStrings[key].ConnectionString;
            MySqlConnection conn = new MySqlConnection(connString);
            return conn;
        }
    }
}